/**
 *
 */
package st.yushao.restaurant.dao.hibernateImpl;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import st.yushao.restaurant.dao.UserDaoService;
import st.yushao.restaurant.vo.UserVO;


/**
 * @author acer
 */
public class UserDaoServiceHibImpl extends HibernateDaoSupport implements UserDaoService {

    public UserVO getUserById(int userId) {
        return (UserVO) getHibernateTemplate().find("from UserVO where typeId=?", userId);
    }

    @Override
    public List<UserVO> getUserByName(String userName, String pwd) {
        return getHibernateTemplate().find("from UserVO where name=? and password=?", userName, pwd);
    }
}
